package com.whmskj.xjlhsc.mobie.Scheduling.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.whmskj.xjlhsc.jitapi.entity.Device;
import com.whmskj.xjlhsc.mobie.Scheduling.Dto.EmployeeFilesResultDTO;
import com.whmskj.xjlhsc.mobie.Scheduling.entity.yg01EmployeeFiles;
import com.whmskj.xjlhsc.mobie.empProPlan.entity.ProPersonnelStandConfirm;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * @Author: Sakura
 * @Date: 2025/8/26 17:04
 * @Version: v1.0.0
 * @Description: TODO
 **/
public interface  EmployeeFilesMapper extends BaseMapper<yg01EmployeeFiles> {

    // 查询员工数量
    @Select("SELECT COUNT(*) as total, " +
            "COUNT(CASE WHEN gender = '男' THEN 1 END) as male, " +
            "COUNT(CASE WHEN gender = '女' THEN 1 END) as female " +
            "FROM yg01EmployeeFiles")
    Map<String, Object> countEmployees();


    // 查询员工列表
    List<yg01EmployeeFiles> selectEmployeeFilesList(yg01EmployeeFiles employeeFiles);

    // 根据日期、工序等条件查询
    List<ProPersonnelStandConfirm> selectByCondition(ProPersonnelStandConfirm  params);

    // 查询所有设备
    List<Device> allDevice(@Param("params") Device params);

}
